#include <cstdlib>
#include <string>
#include <iostream>
#include <vector>
#include <climits>

using namespace std;


class Solution {
public:
	int trailingZeroes(int n) {
		int pow_two = 2;
		int count_two = 0;
		int pow_five = 5;
		int count_five = 0;
		while (true){
			int count = floor(n / pow_two);
			pow_two *= 2;
			if (count == 0) break;
			count_two += count;
		}
		while (true){
			int count = floor(n / pow_five);
			pow_five *= 5.0;
			if (count == 0) break;
			count_five += count;
		}
		int ans = count_two < count_five ? count_two : count_five;
		return ans;
	}
};
int main(int argc, char argv){

	cout << Solution().trailingZeroes(2147483646) << endl;
	return 0;
}